package com.zbw.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbw.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;

import java.util.HashSet;
import java.util.Map;

//用户的mapper--
@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select * from user where user_name = #{name}")
    @Results({
            @Result(id=true,column="user_id",property="userId"),
            @Result(column="user_name",property="userName"),
    })
    Map<String,Object> getUserByName(@Param("name") String name1);


}